import java.io.*;

public class Client {

	public static void main(String[] args) throws Exception {

		ClientSocket soc = new ClientSocket();
		
		BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
		
		String data = inFromUser.readLine();
		
		soc.send(data.getBytes());

		System.out.println("FROM SERVER: " + new String(soc.receive()));

		soc.close();
	}
}
